﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <%--// Author: Otto Neff | webapps-in-action.com--%>
    <title>webapps-in-action.com</title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager" runat="server" />
    <style>
        body {
            font-family: Arial;
        }
    </style>
</head>
<body>
    <form id="form" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        </telerik:RadAjaxManager>
        <div>
            <telerik:RadAjaxPanel runat="server">
                <telerik:RadAutoCompleteBox runat="server" ID="radAutoCompleteBox" EmptyMessage="Enter Car Brand or Model"
                    InputType="Token" Width="350" DropDownPosition="Automatic" DropDownWidth="350"
                    OnEntryAdded="radAutoCompleteBox_EntryAdded"
                    OnEntryRemoved="radAutoCompleteBox_EntryRemoved" AutoPostBack="true">
                    <WebServiceSettings Method="GetCars" Path="Default.aspx" />
                    <ClientDropDownItemTemplate> 
                        <table cellpadding="0" cellspacing="0">
                            <tr>                                   
                                <td width="100">#= Text #</td>
                                <td style="height:60px;width:200px;"><img src="http://lorempixel.com/200/50/sports/#= Attributes.PhotoId #" alt=" #= Text # "/></td>                                  
                            </tr>
                        </table>
                    </ClientDropDownItemTemplate>
                </telerik:RadAutoCompleteBox>
                <br />
                Your Working Object will be:<br />
                <telerik:RadTextBox runat="server" ID="txtWorkWith" ReadOnly="true" Width="500"></telerik:RadTextBox>
            </telerik:RadAjaxPanel>
        </div>
    </form>
</body>
</html>
